Intelligent medication delivery systems and methods for dose setting and dispensing monitoring

ABSTRACT

Systems, devices, and techniques are disclosed for administering and tracking medicine to patients and providing health management capabilities for patients and caregivers. In some aspects, an intelligent medicine administering system includes a medicine injection device having a multi-channel encoder that detects fault conditions (e.g., such as open or short circuits) and a patient user&#39;s companion device including a software application operable to implement algorithms for detecting faults and communication loss and alerting the patient user for safety and fail-safes of the medicine injection device.

CROSS-REFERENCE TO RELATED APPLICATIONS

This patent document claims priorities to and benefits of U.S.Provisional Patent Application No. 62/668,723 entitled “INTELLIGENTMEDICATION DELIVERY SYSTEMS AND METHODS FOR DOSE SETTING AND DISPENSINGMONITORING” filed on May 8, 2018. The entire content of theaforementioned patent application is incorporated by reference as partof the disclosure of this patent document.

TECHNICAL FIELD

This patent document relates to medicine administering and trackingsystems, devices, and processes.

BACKGROUND

Diabetes mellitus, also referred to as diabetes, is a metabolic diseaseassociated with high blood sugar due to insufficient production or useof insulin by the body. Diabetes is widely-spread globally, affectinghundreds of millions of people, and is among the leading causes of deathglobally. Diabetes has been categorized into three categories or types:type 1, type 2, and gestational diabetes. Type 1 diabetes is associatedwith the body's failure to produce sufficient levels of insulin forcells to uptake glucose. Type 2 diabetes is associated with insulinresistance, in which cells fail to use insulin properly. The third typeof diabetes is commonly referred to as gestational diabetes, which canoccur during pregnancy when a pregnant woman develops a high bloodglucose level. Gestational diabetes can develop into type 2 diabetes,but often resolves after the pregnancy.

SUMMARY

Systems, devices, and techniques are disclosed for administering andtracking medicine to patients and providing health managementcapabilities for patients and caregivers.

In some aspects, an intelligent medicine administering system includes amedicine injection device having a multi-channel, mechanical encoderthat detects fault conditions (e.g., such as open or short circuits) anda patient user's companion device including a software applicationoperable to implement algorithms for detecting faults and communicationloss and alerting the patient user for safety and fail-safes of themedicine injection device.

In some aspects, a system for administering insulin to a patientincludes an injection pen device, the injection pen device structured tocontain a medicine cartridge and include a dose setting mechanism to seta dose of insulin stored in the medicine cartridge to be dispensed bythe injection pen device, a dispensing mechanism to dispense the insulinaccording to the set dose, a sensor unit to detect a dispensed dose, anelectronics unit including a processor, a memory, and a wirelesstransmitter, the electronics unit configured to process the detecteddispensed dose with time data associated with a dispensing event togenerate dose data, and to wirelessly transmit the dose data, and amulti-channel encoder, in communication with the electronics unit andone or both of the dose setting mechanism and the dispensing mechanism,to monitor a dose setting operation or a dose dispensing operation; andthe injection pen device in wireless communication with a mobilecommunication device that includes a data processing unit including aprocessor and memory to receive and process the dose data, wherein oneor both of the electronics unit of the injection pen device or the dataprocessing unit of the mobile communication device are configured todetermine a fault in an operation of the injection pen device indicativeof an error based on a quality of signal from the multi-channel encoder,wherein the fault is determined based on a signal quality analysis of atleast one of electrical noise, signal frequency error, phase error, orduty cycle error.

In some aspects, a multi-channel encoder for an insulin injection deviceincludes a first component including a substrate and a pattern ofelectrically conductive segmented contact pads in a first region of thesubstrate, and a plurality of channel pads disposed on the substrate ina second region, the plurality of channel pads including an electricalground pad and at least three input channel pads; and a second componentincluding an electrically conductive sweeping contact that electricallyinterfaces with individual segmented contact pads of the firstcomponent, one at a time, during the sweep of the pattern, wherein thesecond component is configured to rotate about a shared axis with thefirst component, or vice versa, such that the sweeping contact sweepsalong the pattern of segmented contact pads during rotation wherein themulti-channel encoder is in communication with a processing unit of theinsulin injection device.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A shows a diagram of an example embodiment of an intelligentmedicine administering system in accordance with the present technology.

FIG. 1B shows a diagram of an example embodiment of a pen device of theintelligent medicine administering system of FIG. 1A.

FIG. 1C shows a block diagram of an example embodiment of the companiondevice of the intelligent medicine administering system of FIG. 1A.

FIG. 1D shows a block diagram of an example software architecture ofdata processing modules in some example embodiments of the app of theintelligent medicine administrating system of FIG. 1A.

FIGS. 2A-2E show voltage-time plots of various example outputs of amechanical encoder's electrical output to illustrate the noisequantification techniques by an example embodiment of a quantitativeencoder signal analysis algorithm in accordance with the presenttechnology.

FIG. 3A shows a block diagram of a pen device including an exampleembodiment of a multi-channel pattern encoder in accordance with thepresent technology.

FIGS. 3B-3D show illustrative diagrams of an example embodiment of apattern wheel of a multi-channel pattern encoder in accordance with thepresent technology.

FIG. 3E shows a diagram of an example embodiment of the multi-channelpattern encoder including the pattern wheel of FIGS. 3B and 3C in anexample implementation.

FIG. 4A shows a diagram of an example embodiment of a multi-channelpattern encoder in accordance with the present technology.

FIG. 4B shows a diagram of an implementation of an example embodiment ofthe multi-channel encoder of FIG. 4A.

FIG. 4C shows a diagram of an example embodiment of the multi-channelpattern encoder operable to detect explicit liquid faults in amedicament delivery device.

FIG. 4D shows a diagram of an example embodiment of the multi-channelpattern encoder operable to sense ground for detection of explicitfaults in a medicament delivery device.

FIG. 5A-5C show example data plots of implementations of example encodersignal analysis schemes in accordance with the present technology.

FIG. 6 shows a diagram of an example monitoring implementation of anexample multi-channel active pattern encoder in accordance with thepresent technology, in which no fault is correctly detected.

FIG. 7 show a diagram of an example monitoring implementation of anexample multi-contact active pattern encoder in accordance with thepresent technology, in which a fault is correctly detected.

FIG. 8 shows a diagram of a monitoring implementation using an exampleembodiment of a multi-channel pattern encoder in accordance with thepresent technology.

FIGS. 9A and 9B show diagrams of an example embodiment of amulti-channel pattern encoder in accordance with the present technology.

FIG. 10 shows a diagram of an example embodiment of a multi-channelpattern encoder in accordance with the present technology.

FIG. 11 shows a diagram of an example embodiment of a multi-channelpattern encoder in accordance with the present technology.

DETAILED DESCRIPTION

Various diseases and medical conditions, such as diabetes, require apatient to self-administer doses of a fluid medication. Typically, whenadministering a fluid medication, the appropriate dose amount is set anddispensed by the patient using a syringe, a pen, or a pump. For example,self-administered medicaments or medicine include insulin used to treatdiabetes, Follistim® used to treat infertility, or other injectablemedicines such as Humira®, Enbrel®, Lovenox® and Ovidrel®, or others.

A medicament pen is a device that can be used to inject a quantity of amedicine (e.g., single or multiple boluses or doses of the medicine)into a user's body, where more than one dose can be stored in a medicinecartridge contained in the pen device. Pens offer the benefit ofsimplicity over other methods of delivery, such as syringe or pump-basedmethods. For example, syringes typically require more steps to deliver adose, and pumps typically are more complicated to use and require aconstant tether to the patient. However, previously there has not beenan automated way to track and communicate the doses given with the penin a simple, effective and reliable manner. In addition, it can bedifficult to know how much to dose with the pen, when to dose, or if thepatient dosed at all.

As with the dosing of any medication, it is sometimes hard for a patientto remember if a dose has been given. For this reason, for example, pillreminders have been developed where the patient places the medicationfor the day in a cup labeled with that day. Once they take theirmedication, there is no question it has been taken because the pills areno longer in the cup. Yet, there are no widely acceptable solutions thataddress this problem for injection-based therapies. Therefore, withoutsimple, effective and reliable ways of tracking medicine doses,particularly for managing lifelong or chronic conditions like diabetes,patients may easily miss a dose or administer an incorrect dose (e.g.,under-dose or over-dose) of their medicine which may result in serious,dangerous consequences to their health.

In addition to the challenges of tracking doses, calculating the rightdose at the right time or under the right conditions is a widespreadproblem for patients of chronic conditions requiring daily dosing ofmedicine. Conventional dose calculators for administering insulin forType I and Type II diabetes typically require manual estimation ofcarbohydrates (“carbs”) at mealtime. For some users, carb counting andestimating may be too difficult, and some users may not utilize the dosecalculator due to the manual work and number of steps required to do so,e.g., taking out one's smartphone, opening up an app, manually typingcalculator inputs, etc.

Systems, devices, and techniques are disclosed for administering andtracking medicine to patients and providing health managementcapabilities for patients and caregivers, which include a medicineinjection device having a multi-channel, mechanical encoder that detectsfault conditions (e.g., such as open or short circuits) and a patientuser's companion device including a software application operable toimplement algorithms for detecting faults and communication loss andalerting the patient user for safety and fail-safes of the medicineinjection device.

In some embodiments in accordance with the present technology, anintelligent medicine administering system provides medicine doserecommendation and management capabilities for Type I and Type IIdiabetes patients and their caregivers. In some aspects, the systemincludes a medicine injection device (e.g., insulin pen, also referredto as a “pen” or “pen device”), in wireless communication with apatient's companion device (e.g., smartphone). The companion deviceincludes a software application (“app”) having a dose calculator anddecision support modules to calculate and recommend the dose of amedicine (e.g., insulin) the patient should administer using thewirelessly connected medicine injection device, as well as to providecontrol over several functionalities of the injection device, e.g., suchas monitoring and recording dose sizes dialed on the injection device.

Communication between the pen device and the companion device providesthe ability for dose tracking, logging, calculating, recommending,and/or communicating dose data with a user (e.g., patient user, healthcare provider (HCP) and/or caregiver), and other advantages of theintelligent medicine administering system. For example, each bolus thatis dispensed by the pen device can be automatically logged andcommunicated to the companion device.

FIG. 1A shows a diagram of an example embodiment of an intelligentmedicine administering system 100 in accordance with the presenttechnology. The system 100 includes a pen device 10 in wirelesscommunication with a mobile computing and communication device 5 of apatient user, also referred to as the user's companion device. The pendevice 10 is operable to select, set and/or dispense a dose of themedicine for dispensing. In some implementations, the companion device 5includes a smartphone, tablet, and/or wearable computing device, such asa smartwatch, smartglasses, etc. In some implementations, the companiondevice 5 is in communication with other computing devices, such as alaptop and/or desktop computer, a smart television, or network-basedserver computer. The companion device 5 includes an app associated withthe pen device 10 of the intelligent medicine administering system 100,which can monitor and/or control functionalities of the pen device 10and to provide a dose calculator and/or decision support modules thatcan calculate and recommend a dose of the medicine for the patient userto administer using the pen device 10.

The companion device 5 can be used to obtain, process and/or displaycontextual data that can be used to relate to the patient user's healthcondition, including the condition for which the pen device 10 is usedto treat. In an illustrative example, the companion device 5 is operableto track the patient user's location; the patient user's physicalactivity including step count, movement distance and/or intensity,estimated calories burned, and/or activity duration; and/or the patientuser's interaction pattern with the companion device 5. The appassociated with the system 100 can aggregate and process the contextualdata to generate decision support outputs to guide and aid the patientuser in using the pen device 10 and/or managing their behavior topromote better health outcomes in treating his/her health condition.

In some embodiments, the system 100 includes a sensor device 50 tomonitor one or more health metrics of the patient user. Examples ofhealth metric data monitored by the sensor device 50 include analytes,such as glucose, heart rate, blood pressure, user movement, or other. Insome implementations, the sensor device 50 is a wearable sensor devicesuch as a continuous glucose monitor (CGM) to obtain transcutaneous orblood glucose measurements that are processed to produce continuousglucose values. For example, the continuous glucose monitor can includea glucose processing module implemented on a stand-alone display deviceand/or implemented on the companion device 5, which processes, storesand displays the continuous glucose values for the patient user.

FIG. 1B shows a diagram of an example embodiment of the pen device 10 ofthe intelligent medicine administering system 100. The pen device 10 isstructured to have a body which contains the medicine cartridge (e.g.,which can be replaceable). The pen device 10 is structured to include adose dispensing mechanism to dispense (e.g., deliver) the medicinecontained in the medicine cartridge out of the pen device; a dosesetting mechanism to select and/or set the dose to be dispensed; anoperations monitoring mechanism to determine that the pen device isbeing operated and/or to monitor the operation of the dose beingdispensed (e.g., such as a switch and/or sensor, or an encoder); and anelectronics unit that can include a processor, a memory, a battery orother power source, and a transmitter.

The pen device 10 is configured in communication with the patient user'smobile computing and communication device 5, e.g., such as the user'ssmartphone, tablet, and/or wearable computing device, such as asmartwatch, smartglasses, etc. and/or a user's laptop and/or desktopcomputer, a smart television, or network-based server computer.

In some implementations of the system 100, for example, to use the pendevice 10, the user first dials up a dose using a dose knob. The doseknob of the pen device 10 can be included as part of the dose settingmechanism and/or the dose dispensing mechanism. For example, the dosemay be adjusted up or down prior to administration of the dose. When theuser applies a force against a dose dispensing button (e.g., pressesagainst the dose dispensing button that is caused to protrude outwardfrom the pen's body upon dialing the dose using the dose knob), apushing component (e.g., also referred to as a ‘plunger’) of the dosedispensing mechanism is depressed against an abutment of the medicinecartridge loaded in the pen device 10 to cause the pen device 10 tobegin to dispense the medicine, in which the quantity dispensed is inaccordance with that set by the dose setting mechanism. In suchimplementations, the operations monitoring mechanism of the pen device10 will begin to sense movement of a rotating component or shaft thatdrives the plunger, for example, in which the movement is sensed throughan encoder. In some examples, the encoder can be configured to sense therotation of a component that is coupled to the drive shaft, and as thedrive shaft rotates the plunger moves linearly; and therefore by sensingrotation of the component, the movement of the drive shaft and theplunger is sensed. Movement of the encoder may be detected as dataprocessed by a processor of the electronics unit of the pen device 10,which can be used to measure the dose. In some implementations, theprocessor can then store the size of the dose along with a time stampfor that dose. In some implementations, the pen device 10 can thentransmit the dose and related information to the companion device 5. Insuch implementations when the dose is transmitted, the data associatedwith the particular transmitted dose is marked in the memory of the pendevice 10 as transmitted. In such implementations if the dose was notyet transmitted to the companion device 5, then the data associated withthe dose will be transmitted at the next time a successful communicationlink between the pen device 10 and the companion device 5 isestablished.

The operations monitoring mechanism of the pen device 10 can include asensor that can utilize any method of sensing rotary or linear movement.Non-limiting examples of such sensors include rotary and linearencoders, Hall effect and other magnetic based sensors, linearlyvariable displacement transducers, or any other appropriate method ofsensing known in the art.

The dose dispensing mechanism of the pen device 10 can include amanually powered mechanism or a motorized mechanism. In either case, aforce (e.g., either produced by the patient or by anelectrically-powered motor) pushes on the plunger of the dose dispensingmechanism to in turn force a receiving plunger of the medicament vial orcartridge to deliver the specific amount of the medicament. In someimplementations, for example, the dose dispensing mechanism can beadjusted to deliver the dose over a different period of time. In oneexample, the dose dispensing mechanism can be operated such that theplunger is pushed in by an adjustable tension spring or change the speedof the motor to inject the dose over a time frame (e.g., 1 s, 5 s orother) to aid in reducing the pain of dosing. In one example, the dosedispensing mechanism can be operated over a much longer period of time,e.g., to better match the dynamics of carbohydrates, which can be likean extended bolus with a pump.

The software application (app) of the companion device 5 associated withthe pen device 10 provides a user interface to allow the user to managehis/her health related data. In some implementations, for example, thecompanion device 5 can be configured to control some functionalities ofthe pen device 10. In some implementations, for example, the companiondevice 5 includes the user's existing smartphone, tablet, or wearablecomputing device. In some implementations, for example, the companiondevice 5 is an independent portable device that the user may carry onhis/her person. In one example embodiments of an independent portablecompanion device 5, the companion device 5 includes a data processingunit, wireless communication unit to allow the device to communicatewith the pen device 10, and a display unit.

FIG. 1C shows a block diagram of an example embodiment of the companiondevice 5 of the intelligent medicine administering system 100. The dataprocessing unit of the companion device 5 includes a processor toprocess data, a memory in communication with the processor to storedata, and an input/output unit (I/O) to interface the processor and/ormemory to other modules, units or devices of the companion device 5 orexternal devices. For example, the processor can include a centralprocessing unit (CPU) or a microcontroller unit (MCU). For example, thememory can include and store processor-executable code, which whenexecuted by the processor, configures the data processing unit toperform various operations, e.g., such as receiving information,commands, and/or data, processing information and data, and transmittingor providing information/data to another device. In someimplementations, the data processing unit can transmit raw or processeddata to a computer system or communication network accessible via theInternet (referred to as ‘the cloud’) that includes one or more remotecomputational processing devices (e.g., servers in the cloud). Tosupport various functions of the data processing unit, the memory canstore information and data, such as instructions, software, values,images, and other data processed or referenced by the processor. Forexample, various types of Random Access Memory (RAM) devices, Read OnlyMemory (ROM) devices, Flash Memory devices, and other suitable storagemedia can be used to implement storage functions of the memory unit. TheI/O of the data processing unit can interface the data processing unitwith the wireless communications unit to utilize various types of wiredor wireless interfaces compatible with typical data communicationstandards, for example, which can be used in communications of the dataprocessing unit with other devices such as the pen device 10, via awireless transmitter/receiver (Tx/Rx) unit, e.g., including, but notlimited to, Bluetooth,

Bluetooth low energy, Zigbee, IEEE 802.11, Wireless Local Area Network(WLAN), Wireless Personal Area Network (WPAN), Wireless Wide AreaNetwork (WWAN), WiMAX, IEEE 802.16 (Worldwide Interoperability forMicrowave Access (WiMAX)), 3G/4G/LTE cellular communication methods, NFC(Near Field Communication), and parallel interfaces. The I/O of the dataprocessing unit can also interface with other external interfaces,sources of data storage, and/or visual or audio display devices, etc. toretrieve and transfer data and information that can be processed by theprocessor, stored in the memory unit, or exhibited on an output unit ofthe companion device 5 or an external device. For example, a displayunit of the companion device 5 can be configured to be in datacommunication with the data processing unit, e.g., via the I/O, toprovide a visual display, an audio display, and/or other sensory displaythat produces the user interface of the software application of thedisclosed technology for health management. In some examples, thedisplay unit can include various types of screen displays, speakers, orprinting interfaces, e.g., including but not limited to, light emittingdiode (LED), or liquid crystal display (LCD) monitor or screen, cathoderay tube (CRT) as a visual display; audio signal transducer apparatusesas an audio display; and/or toner, liquid inkjet, solid ink, dyesublimation, inkless (e.g., such as thermal or UV) printing apparatuses,etc.

In various operations of the intelligent medicine administering system100, for example, when a dosing event (e.g., an amount of fluid isdispensed from the pen device 10), a time stamp associated with thedispensing is referenced is recorded by the processing unit of the pendevice 10 (e.g., stored in the memory of the pen device 10). Forexample, the time stamp may be the current time or a time where acount-up timer is used. When the dose information is eventuallytransmitted to the companion device 5, the time stamp and/or a‘time-since-dose’ parameter is transmitted by the pen device 10 andreceived by the companion device 5 and stored in the memory of the dataprocessing unit of the companion device 5. In some implementations, forexample, the time of the dose can be determined without the pen havingto know the current time. This can simplify operation and setup of thepen device 10. In some implementations, for example, a user time isinitialized on the pen device 10 from the companion device 5, in whichthe user time is used for dose time tracking. Using the system 100, thecompanion device 5 can know the time of the dose relative to the currenttime.

Once the companion device 5 receives the dose related information (e.g.,which can include the time information and dose setting and/ordispensing information, and other information about the pen device 10related to the dosing event), the companion device 5 stores the doserelated information in memory, e.g., which can include among a list ofdoses or dosing events. For example, via the software application's userinterface, the companion device 5 allows the patient to browse a list ofprevious doses, to view an estimate of current medicament active in thepatient's body (“medicament on board”) based on calculations performedby a medicine calculation module of the software application, and/or toutilize a dose calculation module of the software application to assistthe patient regarding dose setting information on the size of the nextdose to be delivered. For example, the patient could enter carbohydratesto be eaten, current blood sugar, and the companion device 5 wouldalready know insulin on board. Using these parameters a suggestedmedicine dose (e.g., such as insulin dose), calculated by the dosecalculation module, may be determined. In some implementations, forexample, the companion device 5 can also allow the patient to manuallyenter boluses into the pen device 10 or another medicine deliverydevice. This would be useful if the patient was forced to use a syringe,or if the battery in the pen device 10 was depleted.

Example embodiments and implementations of the disclosed intelligentmedicine administering system, including a medicine injection device(e.g., pen device) in communication with a companion device, aredescribed herein. Some examples of features of an intelligent medicineadministering system that can be used with the example devices, systems,and methods for monitoring dose settings and dispensing operations aredescribed in U.S. Pat. No. 9,672,328 B2, entitled “MedicineAdministering System Including Injection Pen and Companion Device,” theentire content of which is incorporated by reference in this patentdocument.

While the disclosed embodiments described herein are primarily based ondiabetes management systems and methods involving insulin pen andglucose monitoring devices to facilitate understanding of the underlyingconcepts, it is understood that the disclosed embodiments can alsoinclude treatment of other health conditions using other medications bythe pen device and/or monitoring of other analytes by sensor devices.

Robust Dose Measurement and Tracking Device for Medicine DispensingDevice

In a drug delivery device, such as a smart insulin pen, the amount ofdrug delivered may be measured by quantifying mechanism rotation with arotary encoder.

A conventional two-channel quadrature encoder has two channels with onlyfour possible states, all of which are valid, i.e., [00], [10], [01],and [11], and which occur in order as the encoder rotates and in thereverse order when the encoder rotated in the opposite direction. Thesesignals are generated as electrical contacts sweep across a conductivepattern with alternating segments of conductive and non-conductiveareas. In principle, when a contact touches a conductive area, itoutputs a “1”, and when it disconnects and is in a nonconductive area itoutputs a “0”. However, a short circuit caused by damage or liquidingress will appear as [11] and an open circuit caused by damage orcontamination will appear as [00]. However, since these are valid normalstates, no error would be detected by this conventional two-channelencoder. Instead, for example, it would just appear that the encoder wasnot moving. Where an encoder is placed to detect medicine dose size(such as in a smart insulin pen), this would incorrectly indicate thatno dose was taken.

In various uses of conventional encoders, typically the encoder patternis connected to electrical ground and the inputs are pulled high via apull-up resistor; but, in any of the examples the polarity could bereversed or voltage levels changed. All that is required is that thereis a voltage differential between the pattern and the input contacts, sothat connection with the pattern can be detected. The assignment of 0 or1 to connected/disconnected or high/low voltage can also be arbitrarilydefined for each application.

These and other limitations of conventional encoders for use inaccuracy-critical devices, like medicine dispensing devices, createdangerous risks to the end users of such devices. Therefore, medicinedispensing device would greatly benefit from newer designs and dataprocessing schemes to ensure valid states of an encoder are indicativeof the performance accuracy of the medicine dispensing device.

Example embodiments of a multi-channel, mechanical encoder for amedicine dispensing device (such as pen device 10) are described fordetecting fault conditions (e.g., such as open or short circuits) andimproving the accuracy of dose setting and dispensing trackingcapabilities of the medicine dispensing device. Furthermore, exampleembodiments of methods which can be implemented using a softwareapplication on the medicine injection device and/or a correspondingcompanion device are described for detecting fault conditions ofencoders and the loss of communications to and/or alerting of thepatient user in events of damage or other causes that affect signalquality of a mechanical encoder and lead to erroneous results.

FIG. 1D shows a block diagram of an example software architecture ofdata processing modules, labeled 150, in accordance with certain exampleembodiments of the app of the intelligent medicine administrating system100. In some embodiments, the software architecture 150 includes dataprocessing modules embodied as part of the app resident on the companiondevice 5. In some embodiments of the software architecture 150 of thesystem 100, some or all of the data processing modules are resident onthe pen device 10, e.g., resident in the electronics unit. In someembodiments of the software architecture 150, some or all of the dataprocessing modules are resident on the companion device 5, e.g.,resident in the data processing unit. The data processing modules of theapp on the companion device 5 may be include different or the same dataprocessing modules of the software architecture 150 resident on the pendevice 10. Similarly, in some embodiments, for example, the softwarearchitecture 150 can be embodied as part of a data processing system inthe cloud (e.g., resident on one or more cloud computers). In someembodiments, the software architecture 150 is embodied as part of boththe software app on the companion device 5 and the data processingsystem in the cloud, in which some or all of the modules of the softwarearchitecture 150 are shared or divided among the app on the companiondevice 5 and the data processing system in the cloud.

In various implementations, the software architecture 150 processes thedata from the pen device 10, associated with the detected and/orpre-processed output signals of an encoder configured on the pen device10. In some embodiments, one of the data processing modules of thesoftware architecture 150 includes an encoder output processing module152 to receive and process the output signals received by the encoder.The encoder output processing module 152 is able to monitor the ‘health’of the pen device 10 to detect false positives or missed negativesassociated with the output of the encoder, which monitors operations ofthe dose setting and/or dispensing mechanisms of the pen device. Forexample, conventional encoders are susceptible to nondetection of liquidingress in the pen, e.g., due to indication of valid state [11], andnondetection of damage of the pen, e.g., due to a detection of validstate [00]. The encoder output processing module 152 is capable ofinterrogating the output signals of the encoder, e.g., including that ofconventional encoders, in a manner that can distinguish additionalinformation in the output signals and identify such detrimentalconditions of the pen device, like liquid ingress or mechanical orelectrical damage. Additionally, the encoder output processing module152 is configured to detect and alert the patient user of faults in pendevice, and/or to determine loss of communications and alerting thepatient user accordingly. Fault conditions of the pen device can includea mechanically damaged/disconnected electrical contact or connection ofthe encoder, excessive contact wear and/or mechanism wear affectingproper alignment of components of the encoder, liquid intrusion (e.g.,of water, insulin, or other conductive liquid) into the encoder, and/orcorrosion, particulate or foreign material contamination of the encoder.

The software architecture 150 may also be configured to process healthmetric data and contextual data obtained by the app on the companiondevice 5, from the pen device 10, from the sensor device 50, and/or fromother devices of the patient user and/or apps on the companion device 5.In some embodiments, for example, the software architecture 150 includesa data aggregator module 154 to obtain the health metric data from adevice, such as the pen device 10, sensor device 50, and/or otherdevices or apps in communication with the companion device 5. Thesoftware architecture 150 includes or is in communication with adatabase 156 to store the health data and contextual data associatedwith the patient user and populations of patient users In someembodiments, the software architecture 150 includes a dose determinationmodule 158, such as a dose calculator module, to autonomously calculatea dose of the medicine associated with dose injections from the pendevice 10 based on time-relevant and context or circumstances-relevantdata specific to the patient user of the pen device 10. The examplemodules shown in the software architecture diagram can be organized toprovide data to one another in various ways, including directly (e.g.,module-to-module) and/or indirectly (e.g., via an intermediary module),based on a periodic, an intermittent, and/or a per-request basis.

Quantification of Signal Quality from Encoder Output

A well-functioning encoder should have distinct rising and falling edgesin its signal, and for example, with minimal bounce, no erratic spikesor high-frequency transitions, and edges in the proper sequence for thedirection of encoder rotation.

In some implementations of an intelligent medicine administering system100 including the example encoder output processing module 152, thesystem 100 includes a quantitative encoder signal analysis algorithm todetect and quantify the signal quality of an encoder in a dispensingdevice, such as a medicament pen device, e.g., identifying if there is apoor signal quality of the encoder. In some embodiments, thequantitative encoder signal analysis algorithm can be resident in theencoder output processing module 152 of the app, as illustrated in theexample of FIG. 1D. For example, implementations of the algorithm canindicate premature wear, dirt ingress, corrosion, physical damage, orother causes that affect signal quality of a mechanical encoder and leadto erroneous results. Also, for example, by detecting these conditionsearly, a user can be warned and/or a device can be disabled to avoidreaching the point of sending incorrect measurements. Noise can bequantified in implementations of the quantitative encoder signalanalysis algorithm, such that the algorithm produces an output used totrigger a fault over a defined threshold of severity or frequency ofnoise in the encoder signal.

In various embodiments, the quantitative encoder signal analysisalgorithm includes a process to detect the rising portions (e.g., signalportion that trends upward from “0” to “1” or points therebetween) andfalling portions (e.g. signal portion that trends downward from “1” to“0” or points therebetween). The algorithm includes a process toquantitatively analyze the rising and falling portions. In someembodiments of the quantitative encoder signal analysis algorithm, thequantitative analytical process examining one or more of the frequency,phase, duty cycle and/or resistance of the signal to quantify andcharacterize noise in the mechanical encoder, which is used to affect(e.g., detect or correct potential problems in) the performance of theencoder and validate results by the encoder. The output of the algorithmcan include a binary result (e.g., valid or invalid), or other outputcharacterizing the signal.

Implementations of the quantitative encoder signal analysis algorithmare beneficial to an encoder used on devices like a medicament deliverypen due to the design and configuration of the dose setting and/ordispensing mechanisms of such pen devices. For example, other encoders,like on a volume knob of a stereo, might very well be turned erraticallyin both directions at varying speed. However, this is a highly unlikely,if not impossible, scenario for medicament dispensing devices becausesuch devices have certain mechanical constraints. These constraintsprovide can be accounted for in the quantitative encoder signal analysisalgorithm to allow the detections of detrimental conditions of the penthat conventional encoders may fail to identify. As an example, in pendevices, any movement is typically a single continuous rotation in asingle direction. The quantitative encoder signal analysis algorithmthereby can account for this operation in at least some of the detectionmodes described below.

FIGS. 2A-2E show voltage-time plots of various example outputs of amechanical encoder's electrical output to illustrate the noisequantification techniques by the quantitative encoder signal analysisalgorithm. FIG. 2A shows an example voltage-time plot featuring a normalor nominal pattern on the two channels (channel A and channel B) of anexample two-channel quadrature encoder.

Frequency analysis: The algorithm can be used to analyze frequency ofthe encoder signal. For example, the algorithm can identify noise in theencoder, which, given the physical constraints of the encoder's maximumspeed, the electrical signal output of the encoder that exceeds themaximum speed is indicative of erratic noise. FIG. 2B shows an examplevoltage-time plot featuring high frequency noise on one of the channels(channel A) of an example encoder. In this example, the frequency in therising and falling signal of the encoder is monitored by the algorithm,and when the encoder produces a signal in which the frequency of therising and falling passes a predetermined threshold, e.g., exceeds amaximum frequency value, then the algorithm can identify a faultoccurred by the encoder, such as illustrated in FIG. 2B. For example,the threshold can be a value or range based on empirical or precomputeddata values.

Phase analysis: The algorithm can be used to analyze phase of theencoder signal. For example, the algorithm can identify noise in theencoder, in which, for a given direction of rotation, there is a singlecorrect sequence of encoder edges. If edges are observed out of theusual order, it indicates a problem. FIG. 2C shows an examplevoltage-time plot featuring phase error indicative of noise on one ofthe channels (channel A) of an example encoder. The phase in the risingedge or falling edge of samples of the encoder signal is monitored bythe algorithm. In this example, the rising edge of the signal in twoinstances is determined to be out of phase based on a predeterminedphase pattern, such that the algorithm can identify a fault occurred bythe encoder, such as illustrated in FIG. 2C.

Duty cycle: The percent of the time an encoder switch is connected iscalled the duty cycle. At a constant rotational speed, the duty cyclefor a particular encoder is fixed by the conductive pattern stripspacing. In some applications, the duty cycle should be 50%, indicatingthat the contact is connected for as much time as it is disconnected. Ifthe contact wears, creating a wider contact patch, that will increasethe duty cycle. If the pattern gets contaminated at the edges, coveringpart of the pattern, that may decrease the duty cycle. The algorithm canbe used to analyze duty cycle of the encoder signal to identify noiseassociated with a fault in the encoder. In an example of a pen device, amanual pen will not rotate at exactly a fixed speed, but by averagingthe duty cycle observed over several cycles of the encoder, e.g.,possibly over several doses over time, the actual duty cycle can beroughly calculated. If it exceeds a preset threshold, or preset amountof drift from the initial value, the algorithm produces an outputindicative of a problem with the encoder based on the duty cycle of thesignal. For example, the threshold can be a value or range based onempirical or precomputed data values. FIG. 2D shows an examplevoltage-time plot featuring duty cycle error indicative of noise on oneof the channels (channel A) of an example encoder.

Resistance: The algorithm can be used to analyze resistance of theencoder signal to identify noise in the encoder. An analog voltagemeasurement of the input lines can give a rough measure of resistance inthe encoder circuit. Resistance should either be very low whenconnected, or very high when disconnected. If an abnormal resistancebetween the normal values is observed, e.g., determined by aninstability of an output signal of an encoder channel, this can beindicative of dirty or corroded contacts, contamination, or ingress of aconductive liquid such as water or insulin. FIG. 2E shows two examplevoltage-time plots featuring resistance errors indicative of noise onone of the channels (channel A) of an example encoder. The algorithm canprocess the voltage output of each channel and determine whether, forany point in time of the signal, the voltage is within a particular‘high’ range or ‘low’ range or is changing at a particular rate ofchange not associated with a proper rise or fall of the signal betweenstates. For example, the algorithm can monitor a voltage of an encoderchannel output to determine a stability of the voltage within apredetermined stability threshold of supply voltage or a ground voltage.For example, the threshold can be a value or range based on empirical orprecomputed data values. Some examples of the predetermined threshold ofstability include, but are not limited to, within 10%, 5% or 1% of thesupply voltage or ground.

Example Embodiments of Multi-Channel Pattern Encoders

FIG. 3A shows a block diagram of an example embodiment of the pen device10, labeled pen device 210, which includes an example multi-channelpattern encoder 200 in accordance with various embodiments of thepresent technology. The multi-channel pattern encoder 200 is incommunication with the dose setting mechanism and/or the dose dispensingmechanism to quantify positional changes (e.g., rotations) of themechanism and generate output signals. The multi-channel pattern encoder200 is in communication with the electronics unit of the pen device 210to provide the output signals of the encoder 200 to the electronicsunit. In some implementations, the electronics unit (e.g., processor) ofthe pen device 210 can process the output signals in accordance with thedisclosed methods herein for detecting and reporting fault conditions ofthe pen device 210; whereas, additionally or alternatively, in someimplementations the electronics unit of the pen device 210 transmits theoutput signals to the companion device 5 such that the data processingunit of the companion device 5 processes the output signals inaccordance with the disclosed methods herein for detecting and reportingfault conditions of the pen device 210.

Three-Channel Pattern Encoder Embodiments

FIGS. 3B-3D show illustrative diagrams of an example embodiment of apattern wheel of the multi-channel pattern encoder 200, labeled asencoder pattern wheel 230, which includes three active channel pads(e.g., labeled “Input A”, “Input B”, “Input C”) with the conductivepattern of the pattern wheel for measuring three inputs, respectively,and which includes a ground channel pad and ground line formed on thepattern wheel 230. The example pattern wheel 230 can be coupled to thedose setting mechanism and/or the dose dispensing mechanism of the pendevice 210.

FIG. 3B shows a 2D top side view and FIG. 3D shows a 3D top side view ofthe example encoder pattern wheel 230 depicting a pattern of the threechannels, also referred to as “inputs”, and ground on the surface of thepattern wheel, e.g., which can be configured on a printed circuit board.The three channels correspond to the three active channel pads (Input A,B and C) of the encoder pattern wheel 230 shown in FIGS. 3B and 3D; andthe ground on the surface of the pattern wheel corresponds to the groundchannel pad of the encoder pattern wheel 230 shown in FIGS. 3B and 3D.The encoder pattern wheel 230 includes an array of segmented contactpads 233, each corresponding to one of the three inputs, arranged aroundthe outer periphery of the pattern wheel. The segmented contact pads 233interface with a sweeping contact 238 (e.g., spring-loaded contact),shown in FIG. 3D, that sweeps around the pattern wheel 230 to contactthe individual contact pads as rotation occurs. Each of the segmentedcontact pads 233 provides an electrically conductive area toelectrically interface with the sweeping contact 238. As shown in thediagram of FIG. 3B, the example encoder pattern wheel 230 includes threelarge ground pads 231A, 231B, 231C around the inner periphery, of which,can make ground connections to a single rotating contact piece 239 viathe spring connectors 237A, 237B, 237C, respectively (shown in FIG. 3D).Notably, in other examples, the single rotating contact piece 239 cancontact the ground channel by other connection or connections than theone or more spring connectors 237. Of the three channel inputs, one ofthe inputs (labeled “Input C” in FIG. 3B) is connected to every thirdsegment in the pattern of segmented contact pads 233 surrounding theperipheral (outside) of the encoder pattern wheel 230. In someembodiments, the pattern of segmented contact pads 233 is disposed onthe inner peripheral region of the encoder pattern wheel 230, and thechannel pads (e.g., the ground pad, the three example channel inputpads, and large contact pads 231A-C) are arranged on the outerperipheral region of the encoder pattern wheel 230.

FIG. 3C shows the underside view of the example pattern wheel 230 ofFIG. 3B, illustrating one method for routing the electrical circuits.FIG. 3D shows three dimensional views of the example pattern wheel 230.For example, the three example inner ground pads 231A, 231B, and 231Care configured to provide a mounting surface to which a correspondingconductive spring connector 237A, 237B, 237C, respectively, contactsupon to electrically couple to the single rotating contact piece 239. Inthis example, the ground pads are provided for mechanical stability,and, in some embodiments, could be configured as a single ground pad ortwo or more ground pads, or no pads whereby a connection between groundof the pattern wheel 230 and the single rotating contact piece 239 isestablished. In some embodiments, for example, the single rotatingcontact piece 239 includes a solid inner ring that the conductive springconnectors contact, and the spring-loaded sweeping contact 238 thatsweeps across the segmented contact pads 233 of the pattern wheel 230.

FIG. 3E shows a diagram of an example implementation of themulti-channel pattern encoder 200, such as the encoder pattern wheel230. As shown in the diagram of FIG. 3E, the example encoder 200 isconfigured to have each electrical contact connected to an input line ofthe processing unit, which can read the voltage of the inputs, e.g.,input A, input B, input C. In some embodiments, the encoder 200 isconfigured to have the processing unit read the input lines digitally,e.g., detecting whether the input signals are above or below a certainthreshold and reporting a “0” or “1” as an output. In some embodiments,the encoder 200 is configured to have the processing unit read theanalog voltage on the input lines, e.g., in which these signals arestill converted to a digital value at the processing unit, internally;but rather than reporting a “0” or “1”, the output reported by theprocessing unit may range from 0 to 255 or 0 to 65535, for example,representing the relative voltage level detected.

As shown in the diagram of FIG. 3E, the example active pattern encoderincludes a plurality of encoder segments connected to the three inputsA, B and C in repeating order, e.g., . . . C B A C B A C B A C B A . . .etc. Mechanically, the example multi-channel pattern encoder 200 (e.g.,such as the encoder pattern wheel 230) operates by sensing relativemotion between the trace contact(s) and the pattern contact pads. Forexample, the trace contact(s) may rotate with the dispensing mechanism,and the pattern contact pads are fixed on the pattern wheel, which maybe fixed and not rotate; or, vice versa, the pattern wheel having thefixed pattern contact pads may rotate and the trace contact(s) may befixed rotationally. In some implementations, for example, the patternwheel and the trace contact(s) can rotate, where the relative motion isdetected.

Multi-Channel Sequential Pattern Encoder Embodiments for Intrinsic FaultDetection

In another example embodiment of a multi-channel encoder in accordancewith the present technology, e.g., the encoder includes a three (ormore) channel encoder that can traverse a pattern in such a way thatthere is always at least one contact disconnected, and always at leastone contact connected. An example sequence for clockwise rotation maybe: [001], [011], [010], [110], [100], [101], [001], etc. In this way,the states [000] and [111] are invalid, indicating an open circuit(e.g., connection fault) or a short circuit (e.g., liquid ingress). Assuch, the example multi-channel pattern encoder is capable of detectingintrinsic faults in the interfaced device, e.g., such as the pen device10.

FIG. 4A shows a diagram of an example embodiment of a multi-channelpattern encoder in accordance with the present technology. In thisexample, the multi-channel pattern encoder includes three trace contacts401, 402 and 403 (corresponding to trace contacts A, B, C, respectively)that are connected to the three inputs (channels) 411, 412, 413interfaced to the processing unit, in which all three trace contactssweep across a pattern of segments of the encoder's pattern wheel thatare all grounded. In an example implementation of the encoder shown inFIG. 4A, at least one of trace contact A, B or C is not in contact withany one of the segmented contacts on the panel wheel that is grounded;i.e., at least one trace contact is disconnected with ground. In theexample illustrated in FIG. 4A, trace contact C is not in electricalcontact with ground. Also, at least one of trace contact A, B or C is incontact with a segmented contact, and thereby is always connected withground. In this three-channel example, there would never be more thantwo trace contacts not in contact with ground as the three tracecontacts sweep across the segmented contact pads 426, 427, 428, 429,etc. of the encoder under normal operation. If the encoder is operatingproperly, then one input should always detect a signal (i.e., output is[1] or analog equivalent) and one channel should detect ground (i.e.,output is [0] or analog equivalent). If it does not, then the encoderindicates damage, contamination, corrosion, or some other connectionproblem.

FIG. 4B shows a diagram of an implementation of an example embodiment ofa three-channel pattern encoder, like that shown in FIG. 4A, inaccordance with certain embodiments of the encoder 200. As shown in thediagram of FIG. 4B, one contact among the first trace contact 451,second trace contact 452 or third trace contact 453 of the encoder isalways disconnected with ground, and one contact associated with thefirst, second or third trace contacts of the encoder is always connectedwith ground. For example, the diagram depicts a sequence for a clockwiserotation in which the encoder detects [110], [100], [101], [001], and[011], e.g., valid states indicating no faults with the pen device 210.

Multi-Channel Sequential Pattern Encoder Embodiments for Explicit FaultDetection

In some implementations of an intelligent medicine administering system100 including the example multi-channel pattern encoder 200 or otherexample embodiments of a multi-channel encoder in accordance with thepresent technology, the system is configured to provide explicit faultdetection capabilities based on operations of the encoder, e.g., forliquid detection and ground sensing.

Liquid detection: The system 100 can detect explicit faults in amedicament delivery device based on the presence of liquid in thedevice. For example, the encoder of the pen device, such as the encoder200 of the pen device 210, can be configured such that, with an encoderpattern connected to ground and the two active contacts pulled high(e.g., connected to a 1.5 volt source through 500 k-ohm resistors), thethird input line is pulled high. As such, the third line could beexposed near the active contacts but not directly contacting any othercomponents, such that any conductive liquid (such as tap water orinsulin) entering the encoder would bridge the liquid detection contactand the pattern wheel. This would then be detected as a voltage drop ofthe liquid detection input, and indicative of a fault with the pendevice 210.

FIG. 4C shows a diagram of an example embodiment of a multi-channelpattern encoder 460, in accordance with certain embodiments of theencoder 200, that is operable to detect explicit liquid faults in avarious devices such as a medicament delivery device. As shown in thediagram, the multi-channel pattern encoder 460 includes a patterncontact pads 465, 466, 467, 468, 469, etc. on the bottom portion of theencoder; and on the top portion, the encoder 460 includes two sweepingcontacts 461, 462 that are touching the pattern contact pads, and athird contact area 463 that touches nothing. However, if liquid floodsthe area, the third contact area 463 will make some electrical contactwith the pattern contact pads and register a signal, indicating anexplicit fault.

Ground sensing: For conventional mechanical encoders, typically a rotaryencoder pattern consists of a solid inner conductive ring used forconnection to ground, and segmented conductive areas around the ring,used for rotational measurement. A sweeping electrical contact contactsthe solid ring to hold the pattern at ground, while active contactstrace across the conductive segments. By adding another contact on thesolid ring, set as an input, this contact can be used to constantlydetect the ground connection. This input should always detect ground,and if it does not then that indicates damage, contamination, corrosion,or some other connection problem.

In some embodiments of the multi-channel encoder, the encoder includes aground sensing contact that is operable as an input with respect to theencoder. Yet, during an active dose setting and/or dispensing event inwhich the encoder is operated, for example, while edge transitions arebeing detected by the active channels, the ground sensing contactchannel may be set as a ground output. In this way, the ground ring willhave redundant ground connections, helping ensure clean signal quality.Then when the dose is complete, the contact can be set to an input againto monitor proper ground connection.

FIG. 4D shows a diagram of an example embodiment of the multi-channelpattern encoder 470, in accordance with certain embodiments of theencoder 200, that is operable to sense ground for detection of explicitfaults in a medicament delivery device. Notably, the diagram of FIG. 4Donly shows the ground connections on the solid ring, and the A and Bchannel contacts are not pictured. For example, one of these contactswould be the ground connection, and the other would be an inputmeasuring voltage. As illustrated in FIG. 4D, the ‘ground’ contact ofthe example ground-sensing multi-channel pattern encoder 470 istypically in contact and will detect 0V or ground. However, if somethingwere damaged or corroded, the ground-sensing encoder would not makecontact and would detect a fault.

Multi-Channel Sequential Pattern Encoder Embodiments for IntrinsicDetection with Quadrature Encoder

In some implementations of the intelligent medicine administering system100 including the example including the example encoder outputprocessing module 152, the system is configured to provide intrinsicfault detection capabilities based on data processing the outputs of anencoder, e.g., including the disclosed multi-channel pattern encodersand a conventional quadrature encoder.

Pattern Resistance: The quadrature encoder includes a solid conductivering that forms the encoder pattern when the ring is a material with amoderate resistivity, or the encoder includes a fixed resistor betweenthe ground connection ring and the segmented pattern. For example, witha moderate resistivity, or the fixed resistor configuration, any time aninput line contacts the pattern, it should read a specific resistance(or voltage level) indicating that current is flowing only through thepattern. If the resistance is lower than expected, then that indicates acontaminate such as water also carrying some current, lowering theoverall resistance in the circuit.

Resistance in Pattern Gaps: For conventional encoders, typically thereis a dielectric (such as plastic or soldermask) between the conductivesegments of the encoder pattern. Instead, if this material is slightlyconductive (with high resistance) and in contact with ground, or if itis conductive (with low internal resistance) and connected to ground viaa large value resistor, then it can help detect damage. Whereas aconventional quadrature encoder would either be completely connected orcompletely disconnected, the example embodiments of the encoder 200 caninclude material with a moderate resistivity and/or a fixed resistorcoupled between the inner conductive ground ring and the segmentedpattern to provide inputs that should never be completely disconnectedfrom ground. They should only alternate between sections of high and lowresistance. In this way, if they are ever completely disconnected, thisindicates damage to the encoder, circuitry or other components of thedevice, e.g., pen device 10.

In some implementations of these example embodiments of the encoder 200,the encoder can be read (e.g., by the electronics unit) by continuallymonitoring analog voltage of the inputs and evaluating it as it risesand falls.

Yet, in some implementations of these example embodiments of the encoder200, a simpler and faster method than continuous analog measurement(e.g., continually monitoring analog voltage of the inputs) is to onlymeasure analog voltage when the encoder is at rest. For example, oncemotion is detected, the input can be switched to a digital mode. If thepattern resistance is sufficiently low and the gap resistance issufficiently high, a digital input can still correctly interpret theencoder signal. Then when it returns to rest, the analog voltage canagain be sampled to ensure proper connections.

FIG. 5A-5C show example data plots of encoders implementing theseexample features. If the voltage ever reaches ground or full inputvoltage, that indicates a fault. For example, if the circuit operates at2 V, the valid input range may be from 0.2 V to 1.8 V, and anythingbelow 0.2 V indicates a connection fault and anything above 1.8Vindicates a short circuit. FIG. 5A shows an example where the twoquadrature encoder channels A and B are operating within valid inputrange. FIG. 5B shows an example where the quadrature encoder channel Ahas an input signal below the minimum range value (e.g., <0.2 V), whichcan indicate a disconnection fault. FIG. 5C shows an example where thequadrature encoder channel A exceeds the maximum range value (e.g., >1.8V), which can indicate a short circuit.

Example Embodiments and Implementations of Fault Direction Using anEncoder with a Single Trace Contact and a Multi-Channel Active Pattern

For example, some encoders have multiple input contacts that sweepacross conductive stripes on a grounded pattern. One requirement of thisapproach is that the alignment between contacts is critical to ensureproper pattern sequencing. In some instances, the contacts may bespring-loaded and flexible, which can create challenges in ensuring therequired alignment between contacts, especially for high resolutionencoders.

As shown in FIGS. 3B-3E, an example of the multi-channel encoder 200 isincludes a pattern wheel 230 including a solid conductive ring coupledto the dose setting mechanism and/or dose dispensing mechanism, in whichthe conductive ring includes an active pattern produced with accuratefixed-location contact pads, and a single grounded trace contact withnon-critical alignment that can be swept along the active pattern toindicate movement. The pattern is referred to as “active” because itscontact pads are connected to pull-up resistors and processor inputs.For example, with minimal gaps between the contact pads on the patternwheel 230, it can be ensured that the contact is always contacting atleast one channel, but it is not wide enough to bridge all three. Assuch, the states [000] and [111] are fault conditions.

FIG. 6 shows a diagram of a monitoring implementation using an exampleembodiment of the multi-channel active pattern encoder 600 in accordancewith the example embodiment of the pattern wheel 230 shown in FIGS.3B-3D. In this embodiment shown in the diagram of FIG. 6, the segmentedcontact pads are associated with channels or inputs A, B, and C and areelectrically “active.” The single trace contact 601 is grounded and isoperable to make contact with the segmented contact pads as the tracecontact 601, the active contact pads, or both are moved with respect toeach other. As shown in the top situation of the diagram, the firstactive region “A” is in contact with the trace contact 601 such that theoutput signal of the encoder 200 is [100]. As the single channeltransitions, e.g., trace contact 601 rotates around the pattern wheel,when the trace contact 601 is between two active regions, the outputsignal includes two “1” outputs; for example, the output signal of theencoder 200 is [110] when the single channel transitions between thefirst and the second active regions “A” and “B”, respectively. Forexample, the diagram of FIG. 6 depicts a sequence for a clockwiserotation in which the encoder detects [100] in the first active region,[110] in transition between the first and second active regions, [010]in the second active region, [011] in transition between the second andthird active region, [001] when in the third active region, and [101]when in transition between the third and first active regions, e.g.,which are all valid states indicating no faults with the pen device 210.

FIG. 7 shows a diagram of monitoring implementations of an examplemulti-channel active pattern encoder having a single-trace and includingthe pattern wheel 230 in which a fault is correctly detected. Byexample, the implementations illustrated in FIG. 7 can employ theencoder 600 shown in FIG. 6. As shown in the top illustration 710 ofFIG. 7, the single trace contact is not in contact with any of theactive regions, such that the output signal of the encoder is [000]; andin the bottom illustration 720 of FIG. 7, the single contact is incontact with an active region and a substance (e.g., water ingress)which is across two other active regions, such that the output signal ofthe encoder is [111].

Additional advantages of such embodiments of the encoder include, forexample, opportunities for saving energy by de-powering unnecessarychannels and preventing quiescent current draw through them.

Nominally this example encoder 600 produces the pattern [100] [110][010] [011] etc. However, contacting two channels at once may only beinstantaneous as the contact transitions from one pad to the next, so inpractice it would be useful to simply monitor for the triggering of thenext expected channel and disregard when the previous channel isdisconnected, since those will both happen nearly instantaneously.

For example, from initial state [100] the state [110] indicates thatchannel B has now been connected, but the next state [010] when channelA (first active region) disconnects is not considered significant, as itwill happen almost immediately anyway. In the state [100] the onlyimportant channel to monitor is B, and possibly C if the system needs toalso detect reverse rotation. Once A has been contacted, it is no longercritical to monitor its value. Since A is no longer critical, it can bede-powered to save energy. Its state will be unknown to the system, butthis doesn't matter. De-powering can be done instantaneously duringrotation, or after a brief timeout period indicating that movement hasstopped.

In various embodiments, the system can include a power managementalgorithm for the example single-trace multi-channel encoder to monitorthe state changes, determine what channels are critical to have powersupplied, regulate the power to those presently non-critical (e.g.,depower non-critical) and those soon-to-be critical (e.g., power apresently depowered channel), and repeating this process continually orintermittently.

FIG. 8 shows a diagram of a monitoring implementation using an examplemulti-channel active pattern encoder having a single-trace and includingthe pattern wheel 230. By example, the implementations illustrated inFIG. 8 can employ the encoder 600 shown in FIG. 6. Channels that arepowered, and therefore their values can be read by the processor areshown in the 0 or 1 state. Channels that are de-powered, and thereforetheir values cannot be read by the processor are shown as a questionmark “?”.

As shown in the top portion of the diagram labeled 810, in the initialposition the encoder has previously detected contact with A so it is nolonger useful to spend power monitoring that channel, so it is shown asde-powered with a ? state. Similarly, assuming we are not concerned withaccurately measuring backward motion, there is no need to power channelC either, as it is known that B will be contacted first, so the state ofC is irrelevant. Only channel B is powered, as the processor waits forcontact indicating forward movement.

In the subsequent three positions, as shown in the middle portion of thediagram labeled 820, all of the channels are powered during the movementof the single trace so that the processor can measure the magnitude ofthe movement.

Finally, as shown in the bottom portion of the diagram labeled 830,after no changes in input are registered for some timeout period, thetrace contact contacts channels B and C. Because C was the last channeldetected, channels B and C are de-powered, preventing energy loss whilethey remain connected, and only channel A needs to be powered to detectthe next forward movement. If a channel is powered while connected, itdraws current and uses energy, draining power from the battery or otherenergy source. If a channel is powered but not connected, it uses anegligible amount of power, so it is energy efficient to power onlychannels that are disconnected.

FIGS. 9A and 9B show diagrams of an example embodiment of themulti-channel pattern encoder 900 in accordance with some exampleembodiments of the encoder 200, showing an electrical schematic for onechannel of the multi-channel encoder. In this example, a conductivepattern 920 (e.g., a pattern of segmented contact pads, such as . . . A,B, C, A, B, C, . . . ) is connected to ground, and a sweeping contact910 (e.g., a spring-loaded sweeping contact) is coupled to a voltagesource (e.g., +2V) via a pull-up resistor and is coupled to an input ofthe processing unit (Input A in this example). When the sweeping contact910 is not in contact with the conductive pattern 920, as shown in thediagram of FIG. 9A, the detected voltage is 2V at Input A, and there isno current flow. When the sweeping contact 910 is touching a contact padof the conductive pattern 920, as shown in the diagram of FIG. 9B, thedetected voltage is 0V, and there is current flow from the voltagesource to ground, through the pull-up resistor. In some embodiments, theencoder 900 can include a single conductive pattern (conductive pattern920) and multiple sweeping contacts (not shown), where each of themultiple sweeping contacts is connected to a different input of theprocessing unit (such as Input B and Input C).

FIG. 10 shows a diagram of an example embodiment of a multi-channelpattern encoder 1000 in accordance with some example embodiments of theencoder 200, showing an electrical schematic for one channel of themulti-channel encoder. In this example, a conductive pattern 1020 (e.g.,a pattern of segmented contact pads, such as . . . A, B, C, A, B, C, . .. ) is connected to ground, and a sweeping contact 1010 (e.g., aspring-loaded sweeping contact) is coupled to a switchable output of theProcessing Unit via a pull-up resistor, as well as coupled to an inputof the Processing Unit (Input A in this example). In implementations,for example, to enable the encoder channel, the output is set to apositive voltage (e.g., +2V) and the encoder channel functions similarlyto the encoder in FIGS. 9A-9B. However, when the channel is not needed,the output may be disabled, and set to ground (0V) or tristate(disconnected) so that even when the sweeping contact 1010 is touchingthe conductive pattern 1020, no current is flowing, and therefore nopower is consumed by the channel. In some embodiments, the encoder 1000can include a single conductive pattern (conductive pattern 1020) andmultiple sweeping contacts (not shown), where each of the multiplesweeping contacts is connected to a different input of the processingunit (such as Input B and Input C).

FIG. 11 shows a diagram of an example embodiment of a multi-channelpattern encoder 1100 in accordance with some example embodiments of theencoder 200, showing an electrical schematic for one channel of themulti-channel encoder. In this example, elements of a conductive pattern1120 (e.g., a pattern of segmented contact pads, such as . . . A, B, C,A, B, C, . . . ) are connected to a positive voltage source (e.g., +2V)via a pull-up resistor and are monitored by inputs of the processingunit; a sweeping contact 1110 (e.g., a spring-loaded sweeping contact)is connected to ground. Unlike other example encoders that have a singleconductive pattern and multiple sweeping contacts, the encoder 1100 caninclude multiple channels in the conductive pattern 1120 in fixedalignment mounted on a substrate and a single sweeping contact thatsweeps across the multiple channels of the pattern.

Robust Communication

Insulin is a lifesaving drug for people with diabetes, but an overdosecan be dangerous or even lethal. For this reason, it is critical for thesystem to keep an accurate record of all insulin taken by the patient.If the user is relying on the system (for example, an app display) torecommend doses or remind them that they have not yet taken a dose, anyinterruption in the performance of the device or its communication withthe display could lead to the system missing actual doses taken. Forinstance, the user may have taken a dose, but if the system does notreceive this as input or identify a fault condition, it couldover-recommend the next dose and possibly lead to overdose. Other drugs,besides insulin, taken with a smart delivery system may have similardangers if over-dosed.

To improve safety and guarantee the user that data is current andcorrect, it is helpful to have fail-safes for the following scenarios.For example, the example encoders detect fault conditions, as describedabove for the various embodiments, when: (i) the pen's sensor becomesdisconnected or damaged; (ii) the pen's sensor is shorted due to damageor flooding with liquid; and/or (iii) the pen's sensor wears out andsignal becomes unreliable. For example, the example fault conditions canbe detected by the system due to transmission and reception faults,when: (i) the pen's electronics or software malfunction such that itstops transmitting; and/or there is a transmission issue between the penand app, e.g., such as interference, poor reception, or the companiondevice 5 being in a non-communication mode (e.g., airplane mode on asmartphone).

To robustly identify transmission and reception fault conditions, thedisplay (e.g., the app resident on the companion device 5) must ensurethat the medicine dispensing device is operational, communication isfunctioning correctly, and data is up to date.

One example method for accomplishing this include the following. The pendevice 10 may periodically (e.g., every 2 seconds) transmit a beaconindicating that its self-tests are successful, even if there is no newdata to transmit. In this way, if the beacon is not received, regardlessof the cause, the app can identify that there is a system fault and thepotential for dose information to be incomplete.

Another example method to ensure the pen device 10 is operational,communicating correctly and up-to-date with data includes the following:the app may send a request to the pen device 10 to transmit status. Thepen device 10 would then respond with its status, validating that thesystem is functioning. If a response is not received, then thisindicates a system fault.

In some implementations, the beacon or response from the device may alsoincorporate encryption or a walking code to protect against maliciousinterference from an attacker, further ensuring that the user's own penis connected.

In some implementations, the beacon from the device may be initiated bya user action such as a button press or dialing a dose. For example, theapp may prompt the user to press a button on the pen to transmit itsstatus and indicate that the system is functioning properly.

Example embodiments of a medicine delivery system are described whichincludes a device with a fault-identifying encoder, and an app thatmonitors for proper communication with the device and displaysappropriate messages if communication is lost for any reason. Withend-to-end fault detection, a patient user of the system can be surethat the displayed dosing information is accurate, and if there is afault anywhere in the system that could lead to an actual dose beingmissed, it will be communicated.

EXAMPLES

In some embodiments in accordance with the present technology (example1), a system for administering a medicine to a patient includes aninjection pen device, the injection pen device structured to contain amedicine cartridge and include: a dose setting mechanism to set a doseof a medicine stored in the medicine cartridge to be dispensed by theinjection pen device, a dispensing mechanism to dispense the medicineaccording to the set dose, a sensor unit to detect a dispensed dose, anelectronics unit including a processor, a memory, and a wirelesstransmitter, the electronics unit configured to process the detecteddispensed dose with time data associated with a dispensing event togenerate dose data, and to wirelessly transmit the dose data, and amulti-channel encoder, in communication with the electronics unit andone or both of the dose setting mechanism and the dispensing mechanism,to monitor a dose setting operation and/or a dose dispensing operation;and the injection pen device is capable of being in wirelesscommunication with a mobile communication device that includes a dataprocessing unit including a processor and memory to receive and processthe dose data, wherein one or both of the electronics unit of theinjection pen device or the data processing unit of the mobilecommunication device are configured to determine a fault based on adetected error and/or a quality of signal from the multi-channelencoder.

Example 2 includes the system of example 1, wherein the multi-channelencoder includes: a first component including a substrate and a patternof electrically conductive segmented contact pads in a first region ofthe substrate, and a plurality of channel pads disposed on the substratein a second region, the plurality of channel pads including anelectrical ground pad and at least three input channel pads, wherein theat least three input channel pads include a first channel and a secondchannel associated with measuring rotation of the dose setting mechanismand/or the dispensing mechanism, and a third channel associated withholding at least some of the pattern of segmented contact pads atelectrical ground during a sweep of the pattern; and a second componentincluding an electrically conductive sweeping contact that electricallyinterfaces with individual segmented contact pads of the firstcomponent, one at a time, during the sweep of the pattern, wherein thesecond component is configured to rotate about a shared axis with thefirst component, or vice versa, such that the sweeping contact sweepsalong the pattern of segmented contact pads during rotation.

Example 3 includes the system of example 2, wherein the first componentand the second component are configured as annular rings.

Example 4 includes the system of example 2, wherein the first componentincludes a printed circuit board, and the pattern of segmented contactpads and the plurality of channel pads include planar metallic contacts.

Example 5 includes the system of example 2, wherein the sweeping contactincludes a spring-loaded arm that is coupled to a body of the secondcomponent.

Example 6 includes the system of example 2, wherein the first componentfurther includes one or more base pads electrically coupled to theelectrical ground pad.

Example 7 includes the system of example 6, wherein the multi-channelencoder further includes one or more spring connectors to interfacebetween the second component and the one or more base pads, wherein thesecond component includes an interior track along a side of the secondcomponent that faces the first component such that second componentslides along a contacting surface of the spring connectors in theinterior track as the sweeping contact sweeps across the pattern ofsegmented contact pads during rotation.

Example 8 includes the system of example 2, wherein the third channel ofthe multi-channel encoder is operable to actively monitor ground fordetection of damage to the injection pen device.

Example 9 includes the system of example 1, wherein the fault isdetermined based on signal quality analysis of one or more of electricalnoise, signal frequency error, phase error, duty cycle error.

Example 10 includes the system of example 1, wherein the fault isdetermined based on monitoring of channel disconnection or channel shortcircuit associated with the multi-channel encoder.

Example 11 includes the system of example 1, wherein the determinedfault is based on a contaminant or a water ingress in the injection pendevice.

Example 12 includes the system of example 11, wherein the third line thecontaminant or the water ingress in the multi-channel encoder bridges anactive signal monitoring channel and a channel connected to ground tocause a detectable voltage drop indicative of the fault with theinjection pen device.

Example 13 includes the system of example 1, wherein the injection pendevice is operable to transmit a beacon to the companion deviceperiodically indicative of normal function of the injection pen device,such that the data processing unit of the companion device is configuredto (i) detect the fault when the beacon is not received within one ormore of the beacon periods and (ii) produce an alert to be presented onthe companion device indicative of the fault and/or (iii) disable amodule associated with display or calculation of the medicine.

Example 14 includes the system of example 1, wherein at least one of theinjection pen device or the mobile communication device includes asoftware application program product comprising a non-transitorycomputer-readable storage medium having instructions, which whenexecuted by the processor, cause the device to process the output signaldata from the recorder to detect a fault in one or both of the dosesetting mechanism and the dispensing mechanism of the injection pendevice, and to generate an alert associated with the detected fault.

Example 15 includes the system of example 14, wherein the instructionsof the software application program product, which when executed by theprocessor, further cause the device to process communication databetween the injection pen device and the mobile communications device todetermine a loss of communications, and to generate an alert associatedwith the determined loss of communications.

Example 16 includes the system of example 1, wherein the mobilecommunication device is implemented on a smartphone, a tablet, awearable computing device including a smartwatch or smartglasses, acomputer including a laptop computer, or one or more computers networkedin a communication network through the Internet.

In some embodiments in accordance with the present technology (example17), multi-channel encoder for medicament injection device includes afirst component including a substrate and a pattern of electricallyconductive segmented contact pads in a first region of the substrate,and a plurality of channel pads disposed on the substrate in a secondregion, the plurality of channel pads including an electrical ground padand at least three input channel pads, wherein the at least three inputchannel pads include a first channel and a second channel associatedwith measuring rotation of a dose setting and/or dispensing mechanism ofthe medicament injection pen, and a third channel associated withholding at least some of the pattern of segmented contact pads atelectrical ground during a sweep of the pattern; and a second componentincluding an electrically conductive sweeping contact that electricallyinterfaces with individual segmented contact pads of the firstcomponent, one at a time, during the sweep of the pattern, wherein thesecond component is configured to rotate about a shared axis with thefirst component, or vice versa, such that the sweeping contact sweepsalong the pattern of segmented contact pads during rotation wherein themulti-channel encoder is in communication with a processing unit of themedicament injection pen.

Example 18 includes the multi-channel encoder of example 17, wherein thefirst component and the second component are configured as annularrings.

Example 19 includes the multi-channel encoder of example 17, wherein thefirst component includes a printed circuit board, and the pattern ofsegmented contact pads and the plurality of channel pads include planarmetallic contacts.

Example 20 includes the multi-channel encoder of example 17, wherein thesweeping contact includes a spring-loaded arm that is coupled to a bodyof the second component.

Example 21 includes the multi-channel encoder of example 17, wherein thefirst component further includes one or more base pads electricallycoupled to the electrical ground pad.

Example 22 includes the multi-channel encoder of example 21, wherein themulti-channel encoder further includes one or more spring connectors tointerface between the second component and the one or more base pads,wherein the second component includes an interior track along a side ofthe second component that faces the first component such that secondcomponent slides along a contacting surface of the spring connectors inthe interior track as the sweeping contact sweeps across the pattern ofsegmented contact pads during rotation.

Example 23 includes the multi-channel encoder of example 17, wherein thethird channel of the multi-channel encoder is operable to activelymonitor ground for detection of damage to the injection pen device.

In some embodiments in accordance with the present technology (example24), a system for administering a medicine to a patient includes aninjection pen device, wherein the injection pen device includes anelectronics unit including a processor and a memory, and the injectionpen device includes an encoder (e.g., rotary encoder) to monitor a dosesetting operation and/or a dose dispensing operation, the encoderincluding a pattern of contact pads in which at least a portion of thecontact pads include a resistive material, where the processor isconfigured to analyze an output signal of the encoder to determine arotation of a dose setting and/or dose dispensing mechanism of theinjection pen and/or to estimate an amount of a medicine (e.g., insulin)dispensed or pre-set for dispensing from the injection pen device. Insome example embodiments, the system is configured to confirm that theoutput signal is within a threshold of an expected signal (e.g.,voltage) based on an electrical resistance associated with the patternof contact pads. In such example embodiments, the system is configuredto determine a short circuit when an analyzed voltage output is abovethe threshold of the expected signal and identify a short circuit faultcondition, and/or the system is configured to determine an open circuitwhen an analyzed voltage output is below the threshold of the expectedsignal and identify an open circuit fault condition, such that theidentified fault conditions are indicative of one or more of a dirty orcontaminated electrical contact or connection in the multi-channelencoder, a corroded or damaged electrical contact or connection withinthe multi-channel encoder, or an ingress of a liquid within themulti-channel encoder.

Implementations of the subject matter and the functional operationsdescribed in this patent document can be implemented in various systems,digital electronic circuitry, or in computer software, firmware, orhardware, including the structures disclosed in this specification andtheir structural equivalents, or in combinations of one or more of them.Implementations of the subject matter described in this specificationcan be implemented as one or more computer program products, i.e., oneor more modules of computer program instructions encoded on a tangibleand non-transitory computer readable medium for execution by, or tocontrol the operation of, data processing apparatus. The computerreadable medium can be a machine-readable storage device, amachine-readable storage substrate, a memory device, a composition ofmatter effecting a machine-readable propagated signal, or a combinationof one or more of them. The term “data processing unit” or “dataprocessing apparatus” encompasses all apparatus, devices, and machinesfor processing data, including by way of example a programmableprocessor, a computer, or multiple processors or computers. Theapparatus can include, in addition to hardware, code that creates anexecution environment for the computer program in question, e.g., codethat constitutes processor firmware, a protocol stack, a databasemanagement system, an operating system, or a combination of one or moreof them.

A computer program (also known as a program, software, softwareapplication, script, or code) can be written in any form of programminglanguage, including compiled or interpreted languages, and it can bedeployed in any form, including as a stand-alone program or as a module,component, subroutine, or other unit suitable for use in a computingenvironment. A computer program does not necessarily correspond to afile in a file system. A program can be stored in a portion of a filethat holds other programs or data (e.g., one or more scripts stored in amarkup language document), in a single file dedicated to the program inquestion, or in multiple coordinated files (e.g., files that store oneor more modules, sub programs, or portions of code). A computer programcan be deployed to be executed on one computer or on multiple computersthat are located at one site or distributed across multiple sites andinterconnected by a communication network.

The processes and logic flows described in this specification can beperformed by one or more programmable processors executing one or morecomputer programs to perform functions by operating on input data andgenerating output. The processes and logic flows can also be performedby, and apparatus can also be implemented as, special purpose logiccircuitry, e.g., an FPGA (field programmable gate array) or an ASIC(application specific integrated circuit).

Processors suitable for the execution of a computer program include, byway of example, both general and special purpose microprocessors, andany one or more processors of any kind of digital computer. Generally, aprocessor will receive instructions and data from a read only memory ora random access memory or both. The essential elements of a computer area processor for performing instructions and one or more memory devicesfor storing instructions and data. Generally, a computer will alsoinclude, or be operatively coupled to receive data from or transfer datato, or both, one or more mass storage devices for storing data, e.g.,magnetic, magneto optical disks, or optical disks. However, a computerneed not have such devices. Computer readable media suitable for storingcomputer program instructions and data include all forms of nonvolatilememory, media and memory devices, including by way of examplesemiconductor memory devices, e.g., EPROM, EEPROM, and flash memorydevices. The processor and the memory can be supplemented by, orincorporated in, special purpose logic circuitry.

It is intended that the specification, together with the drawings, beconsidered exemplary only, where exemplary means an example. As usedherein, the singular forms “a”, “an” and “the” are intended to includethe plural forms as well, unless the context clearly indicatesotherwise. Additionally, the use of “or” is intended to include“and/or”, unless the context clearly indicates otherwise.

While this patent document contains many specifics, these should not beconstrued as limitations on the scope of any invention or of what may beclaimed, but rather as descriptions of features that may be specific toparticular embodiments of particular inventions. Certain features thatare described in this patent document in the context of separateembodiments can also be implemented in combination in a singleembodiment. Conversely, various features that are described in thecontext of a single embodiment can also be implemented in multipleembodiments separately or in any suitable subcombination. Moreover,although features may be described above as acting in certaincombinations and even initially claimed as such, one or more featuresfrom a claimed combination can in some cases be excised from thecombination, and the claimed combination may be directed to asubcombination or variation of a subcombination.

Similarly, while operations are depicted in the drawings in a particularorder, this should not be understood as requiring that such operationsbe performed in the particular order shown or in sequential order, orthat all illustrated operations be performed, to achieve desirableresults. Moreover, the separation of various system components in theembodiments described in this patent document should not be understoodas requiring such separation in all embodiments.

Only a few implementations and examples are described and otherimplementations, enhancements and variations can be made based on whatis described and illustrated in this patent document.

1. (canceled)
 2. The system of claim 10, wherein the system isconfigured to monitor a frequency in a change between a series of risingand falling portions of the signal of the multi-channel encoder anddetermine when the frequency exceeds a predetermined threshold todetermine the fault in the operation of the injection pen device.
 3. Thesystem of claim 10, wherein the system is configured to monitor a phasein a rising edge, a falling edge, or both a rising edge and a fallingedge of the signal of the multi-channel encoder and determine when thesignal is out of phase based on a predetermined phase pattern todetermine the fault in the operation of the injection pen device.
 4. Thesystem of claim 10, wherein the system is configured to monitor a dutycycle of the signal to determine that a percentage of time that thesignal is high and low is within a predetermined range or ranges todetermine the fault in the operation of the injection pen device.
 5. Thesystem of claim 4, wherein the percentage of time the signal is high andlow is determined by averaging the duty cycle over a plurality of cyclesof the multi-channel encoder.
 6. The system of claim 10, wherein thesystem is configured to monitor a voltage of an encoder channel outputto determine a stability of the voltage within a predetermined thresholdof supply voltage or an electrical ground voltage.
 7. The system ofclaim 10, wherein the multi-channel encoder includes a two-channelquadrature encoder.
 8. The system of claim 10, wherein the multi-channelencoder includes three or more channels.
 9. The system of claim 10,wherein the determined fault is indicative of one or more of a dirty orcontaminated electrical contact or connection in the multi-channelencoder, a corroded or damaged electrical contact or connection withinthe multi-channel encoder, or an ingress of a liquid within themulti-channel encoder.
 10. A system for administering insulin to apatient, comprising: an injection pen device, the injection pen devicestructured to contain a medicine cartridge and include: a dose settingmechanism to set a dose of insulin stored in the medicine cartridge tobe dispensed by the injection pen device, a dispensing mechanism todispense the insulin according to the set dose, a sensor unit to detecta dispensed dose, an electronics unit including a processor, a memory,and a wireless transmitter, the electronics unit configured to processthe detected dispensed dose with time data associated with a dispensingevent to generate dose data, and to wirelessly transmit the dose data,and a multi-channel encoder, in communication with the electronics unitand one or both of the dose setting mechanism and the dispensingmechanism to monitor a dose setting operation or a dose dispensingoperation; and the injection pen device in wireless communication with amobile communication device that includes a data processing unitincluding a processor and memory to receive and process the dose data,wherein one or both of the electronics unit of the injection pen deviceor the data processing unit of the mobile communication device areconfigured to determine a fault in an operation of the injection pendevice indicative of an error based on a quality of signal from themulti-channel encoder, wherein the fault is determined based on a signalquality analysis of at least one of electrical noise signal frequencyerror phase error or duty cycle error wherein the multi-channel encoderincludes: a first component including a substrate and a pattern ofelectrically conductive segmented contact pads in a first region of thesubstrate, and a plurality of channel pads disposed on the substrate ina second region, the plurality of channel pads including an electricalground pad and at least three input channel pads; and a second componentincluding an electrically conductive sweeping contact that electricallyinterfaces with individual segmented contact pads of the firstcomponent, one at a time, during the sweep of the pattern, wherein thesecond component is configured to rotate about a shared axis with thefirst component, or vice versa, such that the sweeping contact sweepsalong the pattern of segmented contact pads during rotation.
 11. Thesystem of claim 10, wherein the at least three input channel padsinclude a first channel and a second channel associated with measuringrotation of the dose setting mechanism and/or the dispensing mechanism,and a third channel associated with holding at least some of the patternof segmented contact pads at electrical ground during a sweep of thepattern.
 12. The system of claim 10, wherein the sweeping contact isconnected to electrical ground.
 13. The system of claim 10, wherein thefault is determined based on monitoring of channel disconnection orchannel short circuit associated with the multi-channel encoder.
 14. Thesystem of claim 10, wherein at least one of the injection pen device orthe mobile communication device includes a software application programproduct comprising a non-transitory computer-readable storage mediumhaving instructions, which when executed by the processor, cause theinjection pen device or the mobile communication device to generate analert associated with the detected fault.
 15. The system of claim 14,wherein the instructions of the software application program product,which when executed by the processor, further cause the injection pendevice or the mobile communication device to process communication databetween the injection pen device and the mobile communications device todetermine a loss of communications and to generate an alert associatedwith the determined loss of communications.
 16. The system of claim 10,wherein the mobile communication device is implemented on a smartphone,a tablet, a wearable computing device including a smartwatch orsmartglasses, a computer including a laptop computer, or one or morecomputers networked in a communication network through the Internet. 17.A multi-channel encoder for an insulin injection device, comprising: afirst component including a substrate and a pattern of electricallyconductive segmented contact pads in a first region of the substrate,and a plurality of channel pads disposed on the substrate in a secondregion, the plurality of channel pads including an electrical ground padand at least three input channel pads; and a second component includingan electrically conductive sweeping contact that electrically interfaceswith individual segmented contact pads of the first component, one at atime, during the sweep of the pattern, wherein the second component isconfigured to rotate about a shared axis with the first component, orvice versa, such that the sweeping contact sweeps along the pattern ofsegmented contact pads during rotation wherein the multi-channel encoderis in communication with a processing unit of the insulin injectiondevice.
 18. The multi-channel encoder of claim 17, wherein the at leastthree input channel pads include a first channel and a second channelassociated with measuring rotation of a dose setting and/or dispensingmechanism of the insulin injection device, and a third channelassociated with holding at least some of the pattern of segmentedcontact pads at electrical ground during a sweep of the pattern.
 19. Themulti-channel encoder of claim 17, wherein the first component and thesecond component are configured as annular rings.
 20. The multi-channelencoder of claim 17, wherein the first component includes a printedcircuit board, and the pattern of segmented contact pads and theplurality of channel pads include planar metallic contacts.
 21. Themulti-channel encoder of claim 17, wherein the sweeping contact includesa spring-loaded arm that is coupled to a body of the second component.22. The multi-channel encoder of claim 17, wherein the first componentfurther includes one or more base pads electrically coupled to theelectrical ground pad.
 23. The multi-channel encoder of claim 22,wherein the multi-channel encoder further includes one or more springconnectors to interface between the second component and the one or morebase pads, wherein the second component includes an interior track alonga side of the second component that faces the first component such thatsecond component slides along a contacting surface of the springconnectors in the interior track as the sweeping contact sweeps acrossthe pattern of segmented contact pads during rotation.
 24. Themulti-channel encoder of claim 17, wherein the third channel of themulti-channel encoder is operable to actively monitor ground fordetection of damage to the injection pen device.